package com.cc.bsp.domain.user;

import java.util.Date;

import com.cc.bsp.domain.AbstractDomain;
import com.cc.bsp.domain.DomainRepositoryService;
import com.cc.bsp.domain.content.DomainServiceContent;
import com.cc.bsp.domain.exception.DomainException;
import com.cc.bsp.domain.user.service.UserRepositoryService;

public class UserDomain extends AbstractDomain {

	public UserDomain() {

	}

	private static final long serialVersionUID = 2136142427761732100L;

	private String userId;

	private String userName;

	private String password;

	private String callName;

	private String job;

	private String duty;

	private String moblie;

	private String officePhone;

	private String email;

	private String qq;

	private String msn;

	private Date createDate;

	private Date updateDate;

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getCallName() {
		return callName;
	}

	public void setCallName(String callName) {
		this.callName = callName;
	}

	public String getJob() {
		return job;
	}

	public void setJob(String job) {
		this.job = job;
	}

	public String getDuty() {
		return duty;
	}

	public void setDuty(String duty) {
		this.duty = duty;
	}

	public String getMoblie() {
		return moblie;
	}

	public void setMoblie(String moblie) {
		this.moblie = moblie;
	}

	public String getOfficePhone() {
		return officePhone;
	}

	public void setOfficePhone(String officePhone) {
		this.officePhone = officePhone;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getQq() {
		return qq;
	}

	public void setQq(String qq) {
		this.qq = qq;
	}

	public String getMsn() {
		return msn;
	}

	public void setMsn(String msn) {
		this.msn = msn;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	public DomainRepositoryService getRepositoryService()
			throws DomainException {
		UserRepositoryService userRepositoryService = (UserRepositoryService) DomainServiceContent.getBeanFactory().getBean("userRepositoryService");
		if (userRepositoryService == null) {
			throw new DomainException("getRepositoryService() return is null");
		} else {
			return userRepositoryService;
		}
	}
}
